package quick.frame.service.bean;

import java.util.Objects;

public class WareHouse {

    /**
     * id : 1000214
     * name : 西药库
     * parentId : 0
     */
    private int id;
    private String name;
    private int parentId;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getParentId() {
        return parentId;
    }

    public void setParentId(int parentId) {
        this.parentId = parentId;
    }
    @Override
    public String toString() {
        return name;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        WareHouse wareHose = (WareHouse) o;
        return id == wareHose.id &&
                parentId == wareHose.parentId &&
                Objects.equals(name, wareHose.name);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, name, parentId);
    }
}
